package turrets;
import Manage.Counter;
public class SuperTurret extends Turret{
	private static int price = 10000;
	public SuperTurret(){
		super();
		price = 10000;
		upgradeprice = price / 4;
		sellprice = price / 2;
		setValues(10000,5,2);
		Counter.addMoney(-1*(getPrice() - super.getPrice()));
	}
	public int getPrice(){
		return price;
	}
	public void playSound(){
		new AePlayWave("SuperTurretShot.wav").start();
	}
	public String getUpGradeInfo(){
		String s = "Upgrade Number           Upgrade                                                              Price\n" + 
				   "Base                                 XXX                                                                      10000\n" +
				   "1st                                    Increase Range                                                 2500\n" +
				   "2nd                                   Decrease Cooldown                                         5000\n" +
				   "3rd                                    Increase Range & Decrease Cooldown       7500";
		return s;
	}
	public String upgrade(){
		if(numupgrades == 3)
			return "Turret is already fully upgraded.";
		if (Counter.getMoney() - upgradeprice < 0){
			return "There is not enough money for that transaction.";
		}else{
			Counter.addMoney(-upgradeprice);
			sellprice = sellprice+(upgradeprice/2);
			upgradeprice = upgradeprice + (price/4);
			switch (numupgrades){
			case 0:
				range++;
				break;
			case 1:
				cooldown--;
				break;
			case 2:
				range++;
				cooldown--;
				break;
			default:
				cooldown = 0;	
			}
			numupgrades++;
			return "Turret Upgraded";
		}
		
	}
}
